package hierarchy

import (
	"gitcode.com/G-YT/ANN/server/api/v1"
	"gitcode.com/G-YT/ANN/server/middleware"
	"github.com/gin-gonic/gin"
)

type FdArticleGraphicRouter struct {
}

// InitFdArticleGraphicRouter 初始化 FdArticleGraphic 路由信息
func (s *FdArticleGraphicRouter) InitFdArticleGraphicRouter(Router *gin.RouterGroup, pubRouter *gin.RouterGroup) {
	fdArticleGraphicRouter := Router.Group("fdArticleGraphic").Use(middleware.OperationRecord())
	//fdArticleGraphicRouterWithoutRecord := Router.Group("fdArticleGraphic")
	fdArticleGraphicRouterPublic := pubRouter.Group("fdArticleGraphic")

	var fdArticleGraphicApi = v1.ApiGroupApp.HierarchyApiGroup.FdArticleGraphicApi
	{
		fdArticleGraphicRouter.POST("createFdArticleGraphic", fdArticleGraphicApi.CreateFdArticleGraphic)             // 新建FdArticleGraphic
		fdArticleGraphicRouter.DELETE("deleteFdArticleGraphic", fdArticleGraphicApi.DeleteFdArticleGraphic)           // 删除FdArticleGraphic
		fdArticleGraphicRouter.DELETE("deleteFdArticleGraphicByIds", fdArticleGraphicApi.DeleteFdArticleGraphicByIds) // 批量删除FdArticleGraphic
		fdArticleGraphicRouter.PUT("updateFdArticleGraphic", fdArticleGraphicApi.UpdateFdArticleGraphic)              // 更新FdArticleGraphic
		fdArticleGraphicRouter.GET("like", fdArticleGraphicApi.FdArticleLike)                                         // 喜欢Graphic
		fdArticleGraphicRouter.GET("collect", fdArticleGraphicApi.FdArticleCollect)                                   // 收藏Graphic
	}
	{
		fdArticleGraphicRouterPublic.GET("findFdArticleGraphic", fdArticleGraphicApi.FindFdArticleGraphic)               // 根据ID获取FdArticleGraphic
		fdArticleGraphicRouterPublic.GET("getFdArticleGraphicList", fdArticleGraphicApi.GetFdArticleGraphicList)         // 获取FdArticleGraphic列表
		fdArticleGraphicRouterPublic.GET("getArticleListByLevelTwoIDs", fdArticleGraphicApi.GetArticleListByLevelTwoIDs) // 根据二级ID集合获取文章列表
	}
}
